package com.example.myapplication

import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import androidx.constraintlayout.widget.ConstraintLayout
import com.binioter.guideview.Component


/**
 * @author:weng
 * @data:2022/10/28
 * @description:
 */

class MainComponent :Component {



    override fun getView(inflater: LayoutInflater?): View {


        val constraintLayout = inflater?.inflate(R.layout.fragment_first, null) as ConstraintLayout
        constraintLayout.setOnClickListener { view ->
            Toast.makeText(view.context, "引导层被点击了", Toast.LENGTH_SHORT).show()
        }
        return constraintLayout
    }


    override fun getAnchor(): Int {

        return Component.ANCHOR_OVER
    }


    override fun getFitPosition(): Int {
        return Component.CIRCLE
    }


    override fun getXOffset(): Int {
       return 0
    }

    override fun getYOffset(): Int {

        return 0
    }
}